package com.beisita.web.controller;

import com.beisita.service.AsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/async")
public class AsyncController {

    @Autowired
    private AsyncService asyncService;

    @RequestMapping("/test")
    public void test() {
        asyncService.addScore();
    }

    @RequestMapping("/test2")
    public void test2() {
        asyncService.addScore2();
    }
}
